home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 November / CPNL0711.ISO / boekhoud / finan / BADGER finance v1.0 beta 2.exe / xampplite / phpMyAdmin / libraries / transformations / application_octetstream__download.inc.php next >
PHP Script  |  2003-12-29  |  822b  |  30 lines

  1. <?php
  2. /* $Id: application_octetstream__download.inc.php,v 2.0 2003/12/29 17:48:40 rabus Exp $ */
  3. // vim: expandtab sw=4 ts=4 sts=4:
  4.  
  5. function PMA_transformation_application_octetstream__download(&$buffer, $options = array(), $meta = '') {
  6. global $row;
  7.  
  8.     if (isset($options[0]) && !empty($options[0])) {
  9.         $cn = $options[0]; // filename
  10.     } else {
  11.         if (isset($options[1]) && !empty($options[1]) && isset($row[$options[1]])) {
  12.             $cn = $row[$options[1]];
  13.         } else {
  14.             $cn = 'binary_file.dat';
  15.         }
  16.     }
  17.  
  18.     return
  19.       sprintf(
  20.         '<a href="transformation_wrapper.php%s&ct=application/octet-stream&cn=%s" title="%s">%s</a>',
  21.  
  22.         $options['wrapper_link'],
  23.         urlencode($cn),
  24.         htmlspecialchars($cn),
  25.         htmlspecialchars($cn)
  26.       );
  27. }
  28.  
  29. ?>
  30.